import datetime
import calendar

def getFirstdayAndLastdayOfLastMonth(week_day):
    d = week_day
    year = d.year
    month = d.month
    if month == 1 :
        month = 12
        year -= 1
    else :
        month -= 1
    days = calendar.monthrange(year, month)[1]  
    return datetime.date(year,month,1),datetime.date(year,month,days)
    

def getFirstdayAndLastdayOfLastMonth(week_day):
    d = week_day
    year = d.year
    month = d.month
    if month == 1 :
        month = 12
        year -= 1
    else :
        month -= 1
    days = calendar.monthrange(year, month)[1]  
    return datetime.date(year,month,1),datetime.date(year,month,days)

a = datetime.datetime.today()
b = a + datetime.timedelta(-28)

s = str(datetime.datetime.isocalendar(b)[1])

print s

#print getFirstdayAndLastdayOfLastMonth(a)
